<?php

Route::group(['prefix' => 'user'], function () {
    //登录模块
    Route::post('login', 'UserController@login')->name('api.user.login'); //用户登录
    Route::post('register', 'UserController@register')->name('api.user.register'); //注册用户
    Route::post('updateInfo', 'UserController@updateInfo')->name('api.user.updateInfo'); //更新用户信息
    Route::post('forgetPwd', 'UserController@forgetPwd')->name('api.user.forgetPwd'); //忘记密码
    Route::post('updatePwd', 'UserController@updatePwd')->name('api.user.updatePwd'); //修改密码
    Route::post('uploadAvatar', 'UserController@uploadAvatar')->name('api.user.uploadAvatar'); //上传头像
    Route::post('logout', 'UserController@logout')->name('api.user.logout'); //注销登录
    Route::post('qqLogin', 'UserController@qqLogin')->name('api.user.qqLogin'); //QQ登录
    Route::post('bindPhone', 'UserController@bindPhone')->name('api.user.bindPhone'); //绑定手机号
    Route::post('bindQQ', 'UserController@bindQQ')->name('api.user.bindQQ'); //绑定QQ
    Route::post('getUserByPhone', 'UserController@getUserByPhone')->name('api.user.getUserByPhone'); //通过手机号查询用户
    //设置
    Route::post('addFeedback', 'UserController@addFeedback')->name('api.user.addFeedback'); //意见反馈
    //地址模块
    Route::post('getDefaultAddress', 'UserController@getDefaultAddress')->name('api.user.getDefaultAddress'); //获取用户默认地址
    Route::post('getUserAddress', 'UserController@getUserAddress')->name('api.user.getUserAddress'); //获取用户收货地址
    Route::post('addressList', 'UserController@addressList')->name('api.user.addressList'); //获取用户收货地址列表
    Route::post('addAddress', 'UserController@addAddress')->name('api.user.addAddress'); //新增收货地址
    Route::post('editAddress', 'UserController@editAddress')->name('api.user.editAddress'); //编辑收货地址
    Route::post('delAddress', 'UserController@delAddress')->name('api.user.delAddress'); //删除收货地址
    Route::post('setDefaultAddress', 'UserController@setDefaultAddress')->name('api.user.setDefaultAddress'); //设置默认地址
    ###对前端接口###
});
